package edu.uic.cs.cs582.process.impl;

import java.util.Comparator;

public class IntArrayComparator implements Comparator<int[]>
{
	@Override
	public int compare(int[] oneArray, int[] anotherArray)
	{
		if (oneArray.length != anotherArray.length)
		{
			return oneArray.length - anotherArray.length;
		}

		for (int index = 0; index < oneArray.length; index++)
		{
			if (oneArray[index] != anotherArray[index])
			{
				return oneArray[index] - anotherArray[index];
			}
		}

		return 0;
	}
}
